import pytest
from selenium import webdriver

@pytest.fixture
def driver():
    print("=== 启动浏览器 ===")
    driver = webdriver.Chrome()
    driver.implicitly_wait(5)
    yield driver
    print("=== 关闭浏览器 ===")
    driver.quit()

@pytest.fixture
def login_page(driver):
    print("=== 创建LoginPage ===")
    from pages.login_page import LoginPage
    return LoginPage(driver)